<html>
<head><title>ROI Calculator</title>
<link rel="stylesheet" type="text/css" href="style.css" />  
</head>
<body>&nbsp;&nbsp;
<img src="images/GELogo.JPG" Align="Middle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src="images/ROICalculator.JPG" width=490 height=125 Align="Middle">
<a name=Top></a>
<br /><br />
<h4>GEHC Service Center : ROI Calculator</h4>
<TABLE height="1000" width=1000 border="0">
<TR>
	<TD colspan="2" bgcolor="#3B73B9" height="20">
		<h5><font color=white>Welcome</font></h5>
	</TD>
</TR>
<TR>
	<TD width="150" vAlign="top" bgcolor="whitesmoke" style="color:#3B73B9;"><P dir="ltr" style="MARGIN-LEFT: 9px"><br />
		<STRONG>Links to Other Sites</STRONG><br />
					<FONT color="#ff0066">&gt;</FONT> <a href="http://www.ge.com">GE Home Page</a><br /><br />
		<STRONG>Links</STRONG><br>
					<FONT color="#ff0066">&gt;</FONT> <a href=logoff.jsp>Logon</a><br /><br />
					
		<STRONG>Instructor Samples</STRONG><br />
					<FONT color="#ff0066">&gt;</FONT> <a href=javascript.jsp>JavaScript Samples</a><br />
					<FONT color="#ff0066">&gt;</FONT> <a href=SchoolMascot.htm>School/Mascot</a><br />						
					<FONT color="#ff0066">&gt;</FONT> <a href=userlist.jsp>User List</a><br /><br />					
					
		<STRONG>Workshop Solutions</STRONG><br />
					<FONT color="#ff0066">&gt;</FONT> <a href=ServicePlans.htm>Service Plans</a><br />	
					<FONT color="#ff0066">&gt;</FONT> <a href=ContactUs.htm>Contact Us</a><br />					
					<FONT color="#ff0066">&gt;</FONT> <a href=ROICalculator.htm>ROI Calculator</a><br />					
					<FONT color="#ff0066">&gt;</FONT> <a href=ShipCalculator.htm>Shipment Calculator</a><br />
					<FONT color="#ff0066">&gt;</FONT> <a href=productlist.jsp>Product List</a><br />	
					<FONT color="#ff0066">&gt;</FONT> <a href=customerlist.jsp>Maintain Customer</a><br />
		</TD>
<TD width="850" vAlign="top"> 
<H2>ROI Calculator</H2>
<form name=roi>
<TABLE>
<TR>
<TD width="150" vAlign="top">
<p>Equipment</p>
</TD>
<TD width="250" vAlign="top">
&nbsp;<select name="equipment">
<option value="130155A321B751" selected>Computed Tomography</option>
<option value="471273A550B1099">Magnetic Resonance Imaging</option>
<option value="304333A751B751">Nuclear Medice</option>
<option value="138933A310B699">X-Ray</option>
<option value="260133A651B999">Ultrasound</option>
</select>
</TD>
<TD width="200" vAlign="top">
<p>Number of procedures per day:</p>
</TD>
<TD width="150" vAlign="top">
&nbsp;<input type="text" name="procedures" size="4" maxlength="4"/>
</TD>
</TR>

<TR>
<TD width="150" vAlign="top">
<p>Plan Type</p>
</TD>
<TD width="250" vAlign="top">
&nbsp;<select name="plan">
<option value="8" selected>Critical Care</option>
<option value="6">Primary Care</option>
<option value="4">Preventative Maintenance</option>
</select>
</TD>
<TD width="200" vAlign="top">
<p>% of procedures inpatient</p>
</TD>
<TD width="150" vAlign="top">
&nbsp;<input type="text" name="pctinpatient" size="4" maxlength="3"/>
</TD>
</TR>

<TR>
<TD width="150" vAlign="top">
<p>InSite Option</p>
</TD>
<TD width="250" vAlign="top">
&nbsp;<INPUT TYPE=CHECKBOX  NAME="insite"><BR /> 
</TD>
<TD width="200" vAlign="top">
<p>% of procedures outpatient</p>
</TD>
<TD width="150" vAlign="top">
&nbsp;<input type="text" name="pctoutpatient" size="4" maxlength="3"/>
</TD>
</TR>

<TR>
<TD width="150" vAlign="top">
&nbsp;<input type="button" name="calc" value="Calculate" onClick="validateForm()"/>
</TD>
</TR>

<TR>
<TD vAlign="top" colspan="4">
<HR>
</TD>
</TR>

<TR>
<TD width="150" vAlign="top">
<p>Contract Price:</p>
</TD>
<TD width="250" vAlign="top">
<p><input type="text" name="contract" readonly="readonly" disabled="disabled" size="10"/></p>
</TD>
<TD width="200" vAlign="top">
<p>Every hour saved is worth:</p>
</TD>
<TD width="150" vAlign="top">
<p><input type="text" name="saving" readonly="readonly" disabled="disabled" size="10"/></p>
</TD>
</TR>

</TABLE>
</form>
</TD></TR></TABLE>

</BODY>
<script Language=JavaScript>
function validateForm() {
 if (roi.procedures.value == "") {  
	 alert("Please fill number of procedures"); 	
 return false;   }
 if (roi.pctinpatient.value == "") {  
	 alert("Please fill percentage of in-patient procedures"); 	
 return false;   }
  if (roi.pctoutpatient.value == "") {  
	 alert("Please fill percentage of out-patient procedures"); 	
 return false;   }

if (isNaN(roi.pctinpatient.value)) {  
	 alert("Percentage of in-patient procedures must be a number!"); 	
	 return false;   }	
if (isNaN(roi.pctoutpatient.value)) {  
	 alert("Percentage of out-patient procedures must be a number!"); 	
	 return false;   }	
if (isNaN(roi.procedures.value)) {  
	 alert("Number procedures must be a number!"); 	
	 return false;   }	
if (parseInt(roi.pctinpatient.value)+parseInt(roi.pctoutpatient.value)!=100) {  
	 alert("In-Patient percentage + Out-Patient percentage procedures must equal 100%"); 	
	 return false;   }	
	 
	 var equipcost = parseInt(roi.equipment.value.substr(0,roi.equipment.value.indexOf("A")));
	 var outcharge = parseInt(roi.equipment.value.substr(roi.equipment.value.indexOf("A")+1,roi.equipment.value.indexOf("B")));
	 var incharge = parseInt(roi.equipment.value.substr(roi.equipment.value.indexOf("B")+1,roi.equipment.value.length));
	 var basecost = parseFloat(roi.plan.value)/100;

if (roi.insite.checked) {
	 roi.contract.value = formatCurrency((equipcost*basecost+2500).toFixed(2));

} else {
	 roi.contract.value = formatCurrency((equipcost*basecost).toFixed(2));

}

	 roi.saving.value = formatCurrency((parseInt(roi.procedures.value)*(incharge*parseFloat(roi.pctinpatient.value)/100+outcharge*parseFloat(roi.pctoutpatient.value)/100)/8).toFixed(2));
	 
	 
}
function formatCurrency(num) {
	num = num.toString().replace(/\$|\,/g, "");
	if (isNaN(num)) num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num * 100 + 0.50000000001);
	cents = num % 100;
	num = Math.floor(num / 100).toString();
	if (cents < 10) cents = "0" + cents;
	for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
	num = num.substring(0, num.length - (4 * i + 3)) + ',' + num.substring(num.length - (4 * i + 3));
	return (((sign) ? '' : '-') + '$' + num + '.' + cents);
}	 	 	                               
</script> 
</HTML>